import BaseApi from "./BaseApi";
const user = "/user";

export default {
    // 登录.
    loginup(condition) {
        let url = "/login";
        return this.requestPost(user, url, condition);
    },
    //注销登录
    logout(condition) {
        let url = "/logout";
        return this.requestPost(user, url, condition);
    },

    //请求封装
    requestGet(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestGet(newUrl, condition);
    },
    requestPost(controller, url, condition) {
        let newUrl = controller + url;
        return BaseApi.requestPost(newUrl, condition);
    }
}